<template>
  <el-row>
    <el-col :span="24" style="text-align: center">
      <div class="search" style="display: inline-block">
        <div style="height: 60px; margin-left: 30px">
          <input
            @keydown.enter="emit('search', searchText)"
            type="text"
            placeholder="请输入商品"
            v-model="searchText"
          />
          <button @click="emit('search', searchText)"></button>
        </div>
      </div>
    </el-col>
  </el-row>
</template>

<script setup lang="ts">
import { ref } from "vue";

// Data
const searchText = ref<string>("");

// Emits
const emit = defineEmits(["search"]);
</script>

<style scoped>
/* Add your styles here if needed */
</style>
